package day03;

public class OperDemo {
    public static void main(String[] args) {
        //1)算数运算符:+,-,*,/,%,++,--
        /*
        System.out.println(5%2);
        System.out.println(2%5);//2
        System.out.println(8%2);
        System.out.println(0%5);//0,商0余0
        */
        /*
        int a=5,b=5;
        a++;
        ++b;
        System.out.println(a);
        System.out.println(b);

        //a++的值为a,++a的值为a+1
        int c=5,d=5;
        int e=c++;
        int f=++d;
        System.out.println(c);
        System.out.println(d);
        System.out.println(e);
        System.out.println(f);

        int aa=4,bb=4;
        aa++;
        ++bb;
        System.out.println(aa);
        System.out.println(bb);

        int cc=3,dd=3;
        int ee=cc++;
        int ff=++dd;
        System.out.println(cc);
        System.out.println(dd);
        System.out.println(ee);
        System.out.println(ff);

        int a1=6,b1=6;
        a1++;
        ++b1;
        System.out.println(a1);
        System.out.println(b1);

        int c1=6,d1=6;
        */
        int a = 5,b=5;
        a--;
        --b;
        System.out.println(a);
        System.out.println(b);

        int c=5,d=5;
        int e=c--;
        int f=--d;
        System.out.println(c);
        System.out.println(d);
        System.out.println(e);
        System.out.println(f);

        int aa=6,bb=5;
        aa--;
        --bb;
        System.out.println(aa);
        System.out.println(bb);

        int cc=5,dd=5;
        int ee=cc--;
        int ff=--dd;
        System.out.println(cc);
        System.out.println(dd);
        System.out.println(ee);
        System.out.println(ff);




    }
}
